home *** CD-ROM | disk | FTP | other *** search
/ The 640 MEG Shareware Studio 2 / The 640 Meg Shareware Studio CD-ROM Volume II (Data Express)(1993).ISO / batch / xset260.zip / PATCH.DOS < prev    next >
Text File  |  1992-08-01  |  2KB  |  46 lines

  1.               Patching COMMAND.COM default environment size
  2.               =============================================
  3.  
  4.  
  5. The default environment size for a new COMMAND.COM being loaded
  6. is hardcoded in the COMMAND.COM program and is in most of the case
  7. very much insufficient. Here is the way to change this value.
  8.  
  9. The presented sections of code are from MS-DOS 5.00 dis-assembled with 
  10. DEBUG so that those with other versions of DOS find the offsets for their 
  11. COMMAND.COM. In other DOS versions, the section of code to be patched is
  12. unchanged, it is simply shifted in position so it's just a question of
  13. locating the correct offsets by searching for strings of bytes from the
  14. sections of code listed below.  The main trick here is to avoid addresses
  15. in the code which are likely to be different (most absolute addresses will
  16. be different while relative addresses may or may not be different). Assuming
  17. you're handy with DEBUG or a similar debugger and know some 8088 assembly,
  18. you should be able to pull it off.  If DEBUG's search command is too limited,
  19. you might try Unassembling the whole COMMAND.COM to a text file and using an
  20. editor or lister utility to search.
  21.  
  22. ENVIRONMENT SIZE:       Search for '10 00' for other DOS versions than 5.0
  23.  
  24. -u 165b
  25.  
  26. 1111:165B 58            POP   AX
  27. 1111:165C C706C01E5100  MOV   WORD PTR [1EC0],0051
  28. 1111:1662 C706BE1E1000  MOV   WORD PTR [1EBE],0010  <<default envir. size>>
  29. 1111:1668 BAD498        MOV   DX,98D4
  30. 1111:166B B104          MOV   CL,04
  31. 1111:166D D3EA          SHR   DX,CL
  32. 1111:166F 8916CE1E      MOV   [1ECE],DX
  33. 1111:1673 2BC2          SUB   AX,DX
  34. 1111:1675 A39802        MOV   [0298],AX
  35. 1111:1678 A12C00        MOV   AX,[002C]
  36.  
  37.  
  38. So, to change your default environment size to 1280, type:
  39.  
  40.         DEBUG COMMAND.COM
  41.         -E 1666 10 50
  42.         -E 1A84 03 02
  43.         -E 2AD3 01 00                                                     
  44.         -W
  45.         -Q
  46.